// import request from '../../utils/request.js'

// // 新增线索
// export const addClue = (data: any) => {
//     return request({ url: `/tienchin/clue`, method: "POST", data: data })
// }


// // 更新线索
// export const updateClue = (data: any) => {
//     return request({ url: `/tienchin/clue`, method: "PUT", data: data })
// }


// // 根据线索id查询详情
// export const getidClue = (channelId: any) => {
//     return request({ url: `/tienchin/clue/activity/${channelId}`, method: "GET" })
// }


// // 查询所有渠道来源
// export const getAllChannel = (data: any) => {
//     return request({ url: `/tienchin/clue/channels`, method: "GET", params: data })
// }


// // 线索跟进
// export const followClues = (data: any) => {
//     return request({ url: `/tienchin/clue/follow`, method: "POST", data: data })
// }


// // 将线索设置为无效线索
// export const invalidClues = (data: any) => {
//     return request({ url: `/tienchin/clue/invalid`, method: "POST", data: data })
// }


// // 查询所有线索-不分页
// export const getAllclues = (data: any) => {
//     return request({ url: `/tienchin/clue/list`, method: "GET", params: data })
// }


// // 根据线索id获取总结
// export const getIdSummary = (clueId: any) => {
//     return request({ url: `/tienchin/clue/summary/${clueId}`, method: "GET" })
// }


// // 根据线索id将线索转为商机
// export const getIdBusiness = (clueId: any, data: any) => {
//     return request({ url: `/tienchin/clue/to_business/${clueId}`, method: "POST", data: data })
// }


// // 根据部门id查询该部门下的人员
// export const getIdPeople = (deptId: any) => {
//     return request({ url: `/tienchin/clue/users/${deptId}`, method: "GET" })
// }


// // 删除线索(可多个)
// export const deleteActivity = (clueIds:any) => {
//     return request({url: `/tienchin/clue/${clueIds}`, method: "DELETE"})
// }


// // 根据线索id查询线索详情
// export const getIdCluesDetails = (clueId: any) => {
//     return request({ url: `/tienchin/clue/${clueId}`, method: "GET" })
// }

import service from "../../utils/request.js";

export const cluelist = (data: any) => {
    return service({ url: `tienchin/clue/list`, method: "GET", params: data })
}
export const cluestatus = () => {
    return service({ url: `system/dict/data/type/clue_status`, method: "GET" })
}
//线索分配
export const Cueallocation = () => {
    return service({ url: `system/dept/treeselect`, method: "GET" })
}
export const channels = () => {
    return service({ url: `tienchin/clue/channels`, method: "GET" })
}
export const activity = (data: any) => {
    return service({ url: `tienchin/clue/activity/${data}`, method: "GET" })
}
//修改
export const summary = (data: any) => {
    return service({ url: `tienchin/clue/summary/${data}`, method: "GET" })
}
//新增线索管理
export const cluesubmit = (data: any) => {
    return service({ url: `tienchin/clue`, method: "POST", data: data })
}
// 删除
//搜索数据
export const PUTsubmit = (data: any) => {
    return service({ url: `tienchin/clue`, method: "PUT", data: data })
}
export const delectdara = (data: any) => {
    return service({ url: `tienchin/clue/${data}`, method: "DELETE", })
}
//分配给
export const Sharedata = (data: any) => {
    return service({ url: `tienchin/clue/users/${data}`, method: "GET", })
}
//查看数据
export const cluedata = (data: any) => {
    return service({ url: `tienchin/clue/${data}`, method: "GET", })
}
//分配记录
export const recordarta = (data: any) => {
    return service({ url: `tienchin/follow/record/clue/${data}`, method: "GET", })
}
//分配用户
export const tobusiness = (data: any) => {
    return service({ url: `tienchin/clue/to_business/${data}`, method: "POST", })
}
//分配
export const assignment = (data: any) => {
    return service({ url: `tienchin/assignment`, method: "POST", data: data })
}
//分配
export const followQS = (data: any) => {
    return service({ url: `tienchin/clue/follow`, method: "POST", data: data })
}
//无效
export const invalid = (data: any) => {
    return service({ url: `tienchin/clue/invalid`, method: "POST", data: data })
}
